//
//  LLAlertView.h
//  textAlertView
//
//  Created by lv xingtao on 12-10-13.
//  Copyright (c) 2012年 lv xingtao. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface LLAlertView : UIView

@property (nonatomic, assign) id delegate;

- (id)initWithTitle:(NSString *)title 
            message:(NSString *)message 
           delegate:(id)delegate 
  cancelButtonTitle:(NSString *)cancelButtonTitle 
   otherButtonTitle:(NSString *)otherButtonTitle;

- (void)show;

@end

@interface LLErrorAlertTipView : UIView

@property (nonatomic, retain) UIImageView *arrowView;
@property (nonatomic, retain) UIView *contentView;

+ (LLErrorAlertTipView*)showTitle:(NSString*)title onView:(UIView*)containView withLinkView:(UIView*)linkView;

@end



typedef void (^DismissBlock)(int buttonIndex);
typedef void (^CancelBlock)();


@interface LLAlertService : NSObject

// 无需确认，1.5秒后消失
+ (void)alertWithTip:(NSString*)tipString;

+ (void)alertWithTip:(NSString*)tipString completeBlock:(void (^)())block;

+ (UIView*)waitingWithTip:(NSString*)tipString;

+ (void)hideWaitingView:(UIView*)waitingView;

// 只有一个“确认”按钮
+ (void)alertWithTip:(NSString*)tipMsg withTitle:(NSString*)title;
+ (void)sysAlertWithTip:(NSString*)tipMsg withTitle:(NSString*)title;

// 任意处理
+ (void) showAlertViewWithTitle:(NSString*) title                    
                        message:(NSString*) message 
              cancelButtonTitle:(NSString*) cancelButtonTitle
              otherButtonTitles:(NSArray*) otherButtons
                      onDismiss:(DismissBlock) dismissed                   
                       onCancel:(CancelBlock) cancelled;
@end

@interface LLToastView : UIView

@property (nonatomic, assign) id delegate;
@property (nonatomic, assign) BOOL needLogo;
@property (nonatomic, assign) BOOL moreLogo;
@property (nonatomic, assign) UIButton *otherBtn;
- (id)initWithTipTitle:(NSString *)tipTitle
           contentView:(UIView *)contentView
              delegate:(id)delegate
     cancelButtonTitle:(NSString *)cancelButtonTitle
      otherButtonTitle:(NSString *)otherButtonTitle;

- (void)show;

@end


#define kNetWaitingNotify       @"llnetwaiting"
#define kNetWaitingDoneNotify   @"llnetwaitingdone"
#define kNetErrorAlertNothify   @"LLNetErrorAlert"
@interface LLNetAlert : NSObject
{
    int waitingCount;
    UIView *waitingView;
}
@end